package com.zzw.bean;

import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

//create table store (
//    id int primary key auto_increment comment '门店id',
//    agent_id int not null comment '代理商id',
//    name varchar(64) not null comment '门店名称',
//    address varchar(128) not null comment '门店地址',
//    category enum('1','2','3','4') not null comment '门店类型(1酒店 2商超 3餐饮 4其它)',
//    picture varchar(255) not null comment '门头照片',
//    status enum('1','2','3') not null default '1' comment '状态(1待审核 2已通过 3已拒绝)',
//    business_hours varchar(64) not null comment '营业时间',
//    remark varchar(255) comment '备注',
//    create_time timestamp not null default current_timestamp comment '创建时间'
//);
public class Store extends BasicEntity {
    /**
     * 门店id
     */
    private Integer id;
    /**
     * 代理商id
     */
    private Integer agentId;
    /**
     * 门店名称
     */
    private String name;
    /**
     * 门店地址
     */
    private String address;
    /**
     * 门店类型(1酒店 2商超 3餐饮 4其它)
     */
    private String category;
    /**
     * 门头照片
     */
    private String picture;
    /**
     * 状态(1待审核 2已通过 3已拒绝)
     */
    private String status;
    /**
     * 营业时间
     */
    private String businessHours;
    /**
     * 备注
     */
    private String remark;
    /**
     * 创建时间
     */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") //格式化前端传入的Json格式的时间
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") //格式化前端传如的表单格式的时间
    private Date createTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getAgentId() {
        return agentId;
    }

    public void setAgentId(Integer agentId) {
        this.agentId = agentId;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public String getCategory() {
        return category;
    }

    public void setCategory(String category) {
        this.category = category;
    }

    public String getPicture() {
        return picture;
    }

    public void setPicture(String picture) {
        this.picture = picture;
    }

    public String getStatus() {
        return status;
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public String getBusinessHours() {
        return businessHours;
    }

    public void setBusinessHours(String businessHours) {
        this.businessHours = businessHours;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    @Override
    public String toString() {
        return "Store{" +
                "id=" + id +
                ", agentId=" + agentId +
                ", name='" + name + '\'' +
                ", address='" + address + '\'' +
                ", category='" + category + '\'' +
                ", picture='" + picture + '\'' +
                ", status='" + status + '\'' +
                ", businessHours='" + businessHours + '\'' +
                ", remark='" + remark + '\'' +
                ", createTime=" + createTime +
                '}';
    }
}
